clear
set more off 
set matsize 8000
cap log close


cd "Replication data and files\"	


use "Prefecture data for replication", clear



global mainspec poststdint regionyear* prefecttrend* ntr_gap_std mfa_std tariff_std  license_std ntr_rate_std veryhighpost, cl(prefecture) partial(regionyear* prefecttrend*)



qui ivreg2 log_emp $mainspec
est2vec industryresults_control, vars(poststdint)  na(Col1) e(N F) replace
qui ivreg2 log_rk $mainspec
est2vec industryresults_control, addto(industryresults_control) na(Col2)
qui ivreg2 log_rfk $mainspec
est2vec industryresults_control, addto(industryresults_control) na(Col3)
qui ivreg2 log_wagesperworker_empwt $mainspec
est2vec industryresults_control, addto(industryresults_control) na(Col6)
qui ivreg2 log_valueadded_perworker_empwt $mainspec
est2vec industryresults_control, addto(industryresults_control) na(Col5)
matrix rownames industryresults_control_b=Post~x~NTR~gap
est2tex industryresults_control, replace preserve path("") mark(stars) levels(90 95 99) fancy collabels("Emp" "Capital" "Frac~foreign~cap" "Wages~per~worker" "Value-added~per~worker")
